import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';

// 页面路由组件
import Home from './demo/home/home'
import Destination from './demo/destination/destination'
import Hotel from './demo/hotel/hotel'
import Place from './demo/place/place'
import Cate from './demo/cate/cate'
import Travels from './demo/travels/travels'
import Guide from './demo/guide/guide'
import Choice from './demo/choice/choice'
import Download from './demo/download/download'
import More from './demo/more/more'

import {
  BrowserRouter as Router,
  Route,
  Link
} from 'react-router-dom'



class App extends Component {
  render() {
    return (
      <div className="app">
         <Router>
          <div>

            <div className="header">
              <ul>
                <li><Link to="/">首页</Link></li>
                <li><Link to="/destination">目的地</Link></li>
                <li><Link to="/hotel">酒店</Link></li>
                <li><Link to="/place">景点</Link></li>
                <li><Link to="/cate">美食</Link></li>
                <li><Link to="/travels">游记</Link></li>
                <li><Link to="/guide">指南</Link></li>
                <li><Link to="/choice">旅游者之选</Link></li>
                <li><Link to="/download">App下载</Link></li>
                <li><Link to="/more">…</Link></li>
              </ul>
            </div>
            
            <div className="view">
              <Route exact path="/" component={Home}/>
              <Route path="/destination" component={Destination}/>
              <Route path="/hotel" component={Hotel}/>
              <Route path="/place" component={Place}/>
              <Route path="/cate" component={Cate}/>
              <Route path="/travels" component={Travels}/>
              <Route path="/guide" component={Guide}/>
              <Route path="/choice" component={Choice}/>
              <Route path="/download" component={Download}/>
              <Route path="/more" component={More}/>
            </div>
            
          </div>
        </Router>
      </div>
    );
  }
}

export default App;
